﻿Imports System.Data.SqlClient
Imports MySql.Data.MySqlClient

Public Class frmMaHoaTaiLieu
    Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents btnNew As System.Windows.Forms.Button
    Friend WithEvents btnSave As System.Windows.Forms.Button
    Friend WithEvents btnDelete1 As System.Windows.Forms.Button
    Friend WithEvents txtMaTaiLieu As System.Windows.Forms.TextBox
    Friend WithEvents BtnClose As System.Windows.Forms.Button
    Friend WithEvents BtnIn As System.Windows.Forms.Button
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
    Friend WithEvents CboBoPhanBanHanh As MTGCComboBox
    Friend WithEvents GhichuDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents MatinhDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents CboLoaiTaiLieu As MTGCComboBox
    Friend WithEvents TxtTenLoaiTaiLieu As System.Windows.Forms.TextBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents TxtKyHieu As System.Windows.Forms.TextBox
    Friend WithEvents DataSetForm_Sop As PHUQUI.DataSetForm_Sop
    Friend WithEvents TxtSoThuTu As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label7 As System.Windows.Forms.Label
    Friend WithEvents TblmahoatailieuBindingSource As System.Windows.Forms.BindingSource
    Friend WithEvents CboSoLanBanHanh As MTGCComboBox
    Friend WithEvents TxtSoLanBanHanh As System.Windows.Forms.TextBox
    Friend WithEvents txtCapNhatThanh As System.Windows.Forms.TextBox
    Friend WithEvents Label8 As System.Windows.Forms.Label
    Friend WithEvents MatailieuDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents MabophanbanhanhDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents LoaitailieuDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents SothutuDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents SolanbanhanhDataGridViewTextBoxColumn As System.Windows.Forms.DataGridViewTextBoxColumn
    Friend WithEvents TxtTenBoPhanBanHanh As System.Windows.Forms.TextBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMaHoaTaiLieu))
        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle
        Me.btnSave = New System.Windows.Forms.Button
        Me.txtMaTaiLieu = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.btnNew = New System.Windows.Forms.Button
        Me.btnDelete1 = New System.Windows.Forms.Button
        Me.BtnClose = New System.Windows.Forms.Button
        Me.BtnIn = New System.Windows.Forms.Button
        Me.Label5 = New System.Windows.Forms.Label
        Me.TxtTenBoPhanBanHanh = New System.Windows.Forms.TextBox
        Me.DataGridView1 = New System.Windows.Forms.DataGridView
        Me.MatailieuDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.MabophanbanhanhDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.LoaitailieuDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.SothutuDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.SolanbanhanhDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn
        Me.TblmahoatailieuBindingSource = New System.Windows.Forms.BindingSource(Me.components)
        Me.DataSetForm_Sop = New PHUQUI.DataSetForm_Sop
        Me.CboBoPhanBanHanh = New MTGCComboBox
        Me.CboLoaiTaiLieu = New MTGCComboBox
        Me.TxtTenLoaiTaiLieu = New System.Windows.Forms.TextBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.TxtKyHieu = New System.Windows.Forms.TextBox
        Me.TxtSoThuTu = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.CboSoLanBanHanh = New MTGCComboBox
        Me.TxtSoLanBanHanh = New System.Windows.Forms.TextBox
        Me.txtCapNhatThanh = New System.Windows.Forms.TextBox
        Me.Label8 = New System.Windows.Forms.Label
        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.TblmahoatailieuBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSetForm_Sop, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'btnSave
        '
        Me.btnSave.BackColor = System.Drawing.Color.Transparent
        Me.btnSave.Image = CType(resources.GetObject("btnSave.Image"), System.Drawing.Image)
        Me.btnSave.Location = New System.Drawing.Point(271, 174)
        Me.btnSave.Name = "btnSave"
        Me.btnSave.Size = New System.Drawing.Size(88, 24)
        Me.btnSave.TabIndex = 5
        Me.btnSave.UseVisualStyleBackColor = False
        '
        'txtMaTaiLieu
        '
        Me.txtMaTaiLieu.BackColor = System.Drawing.SystemColors.Info
        Me.txtMaTaiLieu.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtMaTaiLieu.ForeColor = System.Drawing.Color.Red
        Me.txtMaTaiLieu.Location = New System.Drawing.Point(299, 45)
        Me.txtMaTaiLieu.MaxLength = 10
        Me.txtMaTaiLieu.Name = "txtMaTaiLieu"
        Me.txtMaTaiLieu.Size = New System.Drawing.Size(138, 26)
        Me.txtMaTaiLieu.TabIndex = 1
        Me.txtMaTaiLieu.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(63, 48)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(96, 18)
        Me.Label2.TabIndex = 12
        Me.Label2.Text = "Ký hiệu Danh Mục"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.Color.Transparent
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(230, 6)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(422, 24)
        Me.Label1.TabIndex = 11
        Me.Label1.Text = "MÃ HÓA DANH MỤC TÀI LIỆU"
        '
        'btnNew
        '
        Me.btnNew.Image = CType(resources.GetObject("btnNew.Image"), System.Drawing.Image)
        Me.btnNew.Location = New System.Drawing.Point(173, 174)
        Me.btnNew.Name = "btnNew"
        Me.btnNew.Size = New System.Drawing.Size(88, 24)
        Me.btnNew.TabIndex = 6
        '
        'btnDelete1
        '
        Me.btnDelete1.Image = CType(resources.GetObject("btnDelete1.Image"), System.Drawing.Image)
        Me.btnDelete1.Location = New System.Drawing.Point(370, 174)
        Me.btnDelete1.Name = "btnDelete1"
        Me.btnDelete1.Size = New System.Drawing.Size(88, 24)
        Me.btnDelete1.TabIndex = 29
        '
        'BtnClose
        '
        Me.BtnClose.Image = CType(resources.GetObject("BtnClose.Image"), System.Drawing.Image)
        Me.BtnClose.Location = New System.Drawing.Point(570, 174)
        Me.BtnClose.Name = "BtnClose"
        Me.BtnClose.Size = New System.Drawing.Size(88, 24)
        Me.BtnClose.TabIndex = 30
        '
        'BtnIn
        '
        Me.BtnIn.Image = CType(resources.GetObject("BtnIn.Image"), System.Drawing.Image)
        Me.BtnIn.Location = New System.Drawing.Point(470, 174)
        Me.BtnIn.Name = "BtnIn"
        Me.BtnIn.Size = New System.Drawing.Size(88, 24)
        Me.BtnIn.TabIndex = 39
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(82, 74)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(77, 18)
        Me.Label5.TabIndex = 41
        Me.Label5.Text = "Bộ Phận BH"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TxtTenBoPhanBanHanh
        '
        Me.TxtTenBoPhanBanHanh.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTenBoPhanBanHanh.Location = New System.Drawing.Point(299, 73)
        Me.TxtTenBoPhanBanHanh.MaxLength = 50
        Me.TxtTenBoPhanBanHanh.Name = "TxtTenBoPhanBanHanh"
        Me.TxtTenBoPhanBanHanh.Size = New System.Drawing.Size(428, 22)
        Me.TxtTenBoPhanBanHanh.TabIndex = 42
        '
        'DataGridView1
        '
        Me.DataGridView1.AllowUserToAddRows = False
        Me.DataGridView1.AllowUserToDeleteRows = False
        Me.DataGridView1.AllowUserToResizeColumns = False
        Me.DataGridView1.AutoGenerateColumns = False
        Me.DataGridView1.BackgroundColor = System.Drawing.Color.LightBlue
        DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
        DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control
        DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText
        DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
        DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
        DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
        Me.DataGridView1.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle1
        Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
        Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.MatailieuDataGridViewTextBoxColumn, Me.MabophanbanhanhDataGridViewTextBoxColumn, Me.LoaitailieuDataGridViewTextBoxColumn, Me.SothutuDataGridViewTextBoxColumn, Me.SolanbanhanhDataGridViewTextBoxColumn})
        Me.DataGridView1.DataSource = Me.TblmahoatailieuBindingSource
        Me.DataGridView1.Location = New System.Drawing.Point(12, 214)
        Me.DataGridView1.Name = "DataGridView1"
        Me.DataGridView1.ReadOnly = True
        Me.DataGridView1.RowHeadersWidth = 25
        Me.DataGridView1.Size = New System.Drawing.Size(768, 356)
        Me.DataGridView1.TabIndex = 48
        '
        'MatailieuDataGridViewTextBoxColumn
        '
        Me.MatailieuDataGridViewTextBoxColumn.DataPropertyName = "matailieu"
        Me.MatailieuDataGridViewTextBoxColumn.HeaderText = "Mã số"
        Me.MatailieuDataGridViewTextBoxColumn.Name = "MatailieuDataGridViewTextBoxColumn"
        Me.MatailieuDataGridViewTextBoxColumn.ReadOnly = True
        '
        'MabophanbanhanhDataGridViewTextBoxColumn
        '
        Me.MabophanbanhanhDataGridViewTextBoxColumn.DataPropertyName = "mabophanbanhanh"
        Me.MabophanbanhanhDataGridViewTextBoxColumn.HeaderText = "Tên bộ phận BH"
        Me.MabophanbanhanhDataGridViewTextBoxColumn.Name = "MabophanbanhanhDataGridViewTextBoxColumn"
        Me.MabophanbanhanhDataGridViewTextBoxColumn.ReadOnly = True
        Me.MabophanbanhanhDataGridViewTextBoxColumn.Width = 200
        '
        'LoaitailieuDataGridViewTextBoxColumn
        '
        Me.LoaitailieuDataGridViewTextBoxColumn.DataPropertyName = "loaitailieu"
        Me.LoaitailieuDataGridViewTextBoxColumn.HeaderText = "Loại tài liệu"
        Me.LoaitailieuDataGridViewTextBoxColumn.Name = "LoaitailieuDataGridViewTextBoxColumn"
        Me.LoaitailieuDataGridViewTextBoxColumn.ReadOnly = True
        Me.LoaitailieuDataGridViewTextBoxColumn.Width = 200
        '
        'SothutuDataGridViewTextBoxColumn
        '
        Me.SothutuDataGridViewTextBoxColumn.DataPropertyName = "sothutu"
        Me.SothutuDataGridViewTextBoxColumn.HeaderText = "Số thứ tự"
        Me.SothutuDataGridViewTextBoxColumn.Name = "SothutuDataGridViewTextBoxColumn"
        Me.SothutuDataGridViewTextBoxColumn.ReadOnly = True
        Me.SothutuDataGridViewTextBoxColumn.Width = 80
        '
        'SolanbanhanhDataGridViewTextBoxColumn
        '
        Me.SolanbanhanhDataGridViewTextBoxColumn.DataPropertyName = "solanbanhanh"
        Me.SolanbanhanhDataGridViewTextBoxColumn.HeaderText = "Số lần BH"
        Me.SolanbanhanhDataGridViewTextBoxColumn.Name = "SolanbanhanhDataGridViewTextBoxColumn"
        Me.SolanbanhanhDataGridViewTextBoxColumn.ReadOnly = True
        Me.SolanbanhanhDataGridViewTextBoxColumn.Width = 130
        '
        'TblmahoatailieuBindingSource
        '
        Me.TblmahoatailieuBindingSource.DataMember = "tbl_mahoatailieu"
        Me.TblmahoatailieuBindingSource.DataSource = Me.DataSetForm_Sop
        '
        'DataSetForm_Sop
        '
        Me.DataSetForm_Sop.DataSetName = "DataSetForm_Sop"
        Me.DataSetForm_Sop.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
        '
        'CboBoPhanBanHanh
        '
        Me.CboBoPhanBanHanh.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboBoPhanBanHanh.ArrowColor = System.Drawing.Color.Black
        Me.CboBoPhanBanHanh.BindedControl = Nothing
        Me.CboBoPhanBanHanh.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboBoPhanBanHanh.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboBoPhanBanHanh.ColumnNum = 1
        Me.CboBoPhanBanHanh.ColumnWidth = "121"
        Me.CboBoPhanBanHanh.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboBoPhanBanHanh.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboBoPhanBanHanh.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboBoPhanBanHanh.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboBoPhanBanHanh.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboBoPhanBanHanh.DisplayMember = "Text"
        Me.CboBoPhanBanHanh.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboBoPhanBanHanh.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboBoPhanBanHanh.DropDownForeColor = System.Drawing.Color.Black
        Me.CboBoPhanBanHanh.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboBoPhanBanHanh.DropDownWidth = 141
        Me.CboBoPhanBanHanh.GridLineColor = System.Drawing.Color.LightGray
        Me.CboBoPhanBanHanh.GridLineHorizontal = False
        Me.CboBoPhanBanHanh.GridLineVertical = False
        Me.CboBoPhanBanHanh.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboBoPhanBanHanh.Location = New System.Drawing.Point(160, 73)
        Me.CboBoPhanBanHanh.ManagingFastMouseMoving = True
        Me.CboBoPhanBanHanh.ManagingFastMouseMovingInterval = 30
        Me.CboBoPhanBanHanh.Name = "CboBoPhanBanHanh"
        Me.CboBoPhanBanHanh.SelectedItem = Nothing
        Me.CboBoPhanBanHanh.SelectedValue = Nothing
        Me.CboBoPhanBanHanh.Size = New System.Drawing.Size(138, 21)
        Me.CboBoPhanBanHanh.TabIndex = 49
        '
        'CboLoaiTaiLieu
        '
        Me.CboLoaiTaiLieu.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboLoaiTaiLieu.ArrowColor = System.Drawing.Color.Black
        Me.CboLoaiTaiLieu.BindedControl = Nothing
        Me.CboLoaiTaiLieu.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboLoaiTaiLieu.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboLoaiTaiLieu.ColumnNum = 1
        Me.CboLoaiTaiLieu.ColumnWidth = "121"
        Me.CboLoaiTaiLieu.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboLoaiTaiLieu.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboLoaiTaiLieu.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboLoaiTaiLieu.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboLoaiTaiLieu.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboLoaiTaiLieu.DisplayMember = "Text"
        Me.CboLoaiTaiLieu.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboLoaiTaiLieu.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboLoaiTaiLieu.DropDownForeColor = System.Drawing.Color.Black
        Me.CboLoaiTaiLieu.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboLoaiTaiLieu.DropDownWidth = 141
        Me.CboLoaiTaiLieu.GridLineColor = System.Drawing.Color.LightGray
        Me.CboLoaiTaiLieu.GridLineHorizontal = False
        Me.CboLoaiTaiLieu.GridLineVertical = False
        Me.CboLoaiTaiLieu.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboLoaiTaiLieu.Location = New System.Drawing.Point(160, 98)
        Me.CboLoaiTaiLieu.ManagingFastMouseMoving = True
        Me.CboLoaiTaiLieu.ManagingFastMouseMovingInterval = 30
        Me.CboLoaiTaiLieu.Name = "CboLoaiTaiLieu"
        Me.CboLoaiTaiLieu.SelectedItem = Nothing
        Me.CboLoaiTaiLieu.SelectedValue = Nothing
        Me.CboLoaiTaiLieu.Size = New System.Drawing.Size(138, 21)
        Me.CboLoaiTaiLieu.TabIndex = 52
        '
        'TxtTenLoaiTaiLieu
        '
        Me.TxtTenLoaiTaiLieu.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtTenLoaiTaiLieu.Location = New System.Drawing.Point(299, 98)
        Me.TxtTenLoaiTaiLieu.MaxLength = 50
        Me.TxtTenLoaiTaiLieu.Name = "TxtTenLoaiTaiLieu"
        Me.TxtTenLoaiTaiLieu.Size = New System.Drawing.Size(428, 22)
        Me.TxtTenLoaiTaiLieu.TabIndex = 51
        '
        'Label6
        '
        Me.Label6.Location = New System.Drawing.Point(66, 99)
        Me.Label6.Name = "Label6"
        Me.Label6.Size = New System.Drawing.Size(92, 16)
        Me.Label6.TabIndex = 50
        Me.Label6.Text = "Loại Tài Liệu"
        Me.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'TxtKyHieu
        '
        Me.TxtKyHieu.BackColor = System.Drawing.SystemColors.Window
        Me.TxtKyHieu.Font = New System.Drawing.Font("Arial", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtKyHieu.Location = New System.Drawing.Point(160, 45)
        Me.TxtKyHieu.MaxLength = 10
        Me.TxtKyHieu.Name = "TxtKyHieu"
        Me.TxtKyHieu.Size = New System.Drawing.Size(138, 25)
        Me.TxtKyHieu.TabIndex = 56
        Me.TxtKyHieu.Text = "T"
        Me.TxtKyHieu.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'TxtSoThuTu
        '
        Me.TxtSoThuTu.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtSoThuTu.Location = New System.Drawing.Point(160, 122)
        Me.TxtSoThuTu.MaxLength = 50
        Me.TxtSoThuTu.Name = "TxtSoThuTu"
        Me.TxtSoThuTu.Size = New System.Drawing.Size(138, 22)
        Me.TxtSoThuTu.TabIndex = 57
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(67, 124)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(92, 16)
        Me.Label4.TabIndex = 59
        Me.Label4.Text = "Số Thứ Tự"
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'Label7
        '
        Me.Label7.Location = New System.Drawing.Point(68, 148)
        Me.Label7.Name = "Label7"
        Me.Label7.Size = New System.Drawing.Size(92, 16)
        Me.Label7.TabIndex = 60
        Me.Label7.Text = "Số Lần BH"
        Me.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'CboSoLanBanHanh
        '
        Me.CboSoLanBanHanh.ArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboSoLanBanHanh.ArrowColor = System.Drawing.Color.Black
        Me.CboSoLanBanHanh.BindedControl = Nothing
        Me.CboSoLanBanHanh.BorderStyle = MTGCComboBox.TipiBordi.Fixed3D
        Me.CboSoLanBanHanh.CharacterCasing = System.Windows.Forms.CharacterCasing.Normal
        Me.CboSoLanBanHanh.ColumnNum = 1
        Me.CboSoLanBanHanh.ColumnWidth = "121"
        Me.CboSoLanBanHanh.DisabledArrowBoxColor = System.Drawing.SystemColors.Control
        Me.CboSoLanBanHanh.DisabledArrowColor = System.Drawing.Color.LightGray
        Me.CboSoLanBanHanh.DisabledBackColor = System.Drawing.SystemColors.Control
        Me.CboSoLanBanHanh.DisabledBorderColor = System.Drawing.SystemColors.InactiveBorder
        Me.CboSoLanBanHanh.DisabledForeColor = System.Drawing.SystemColors.GrayText
        Me.CboSoLanBanHanh.DisplayMember = "Text"
        Me.CboSoLanBanHanh.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed
        Me.CboSoLanBanHanh.DropDownBackColor = System.Drawing.Color.FromArgb(CType(CType(193, Byte), Integer), CType(CType(210, Byte), Integer), CType(CType(238, Byte), Integer))
        Me.CboSoLanBanHanh.DropDownForeColor = System.Drawing.Color.Black
        Me.CboSoLanBanHanh.DropDownStyle = MTGCComboBox.CustomDropDownStyle.DropDown
        Me.CboSoLanBanHanh.DropDownWidth = 141
        Me.CboSoLanBanHanh.GridLineColor = System.Drawing.Color.LightGray
        Me.CboSoLanBanHanh.GridLineHorizontal = False
        Me.CboSoLanBanHanh.GridLineVertical = False
        Me.CboSoLanBanHanh.LoadingType = MTGCComboBox.CaricamentoCombo.ComboBoxItem
        Me.CboSoLanBanHanh.Location = New System.Drawing.Point(160, 147)
        Me.CboSoLanBanHanh.ManagingFastMouseMoving = True
        Me.CboSoLanBanHanh.ManagingFastMouseMovingInterval = 30
        Me.CboSoLanBanHanh.Name = "CboSoLanBanHanh"
        Me.CboSoLanBanHanh.SelectedItem = Nothing
        Me.CboSoLanBanHanh.SelectedValue = Nothing
        Me.CboSoLanBanHanh.Size = New System.Drawing.Size(138, 21)
        Me.CboSoLanBanHanh.TabIndex = 62
        '
        'TxtSoLanBanHanh
        '
        Me.TxtSoLanBanHanh.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.TxtSoLanBanHanh.Location = New System.Drawing.Point(299, 146)
        Me.TxtSoLanBanHanh.MaxLength = 50
        Me.TxtSoLanBanHanh.Name = "TxtSoLanBanHanh"
        Me.TxtSoLanBanHanh.Size = New System.Drawing.Size(428, 22)
        Me.TxtSoLanBanHanh.TabIndex = 61
        '
        'txtCapNhatThanh
        '
        Me.txtCapNhatThanh.BackColor = System.Drawing.SystemColors.Info
        Me.txtCapNhatThanh.Font = New System.Drawing.Font("Arial", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.txtCapNhatThanh.ForeColor = System.Drawing.Color.Red
        Me.txtCapNhatThanh.Location = New System.Drawing.Point(589, 45)
        Me.txtCapNhatThanh.MaxLength = 10
        Me.txtCapNhatThanh.Name = "txtCapNhatThanh"
        Me.txtCapNhatThanh.Size = New System.Drawing.Size(138, 26)
        Me.txtCapNhatThanh.TabIndex = 63
        Me.txtCapNhatThanh.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'Label8
        '
        Me.Label8.Location = New System.Drawing.Point(470, 47)
        Me.Label8.Name = "Label8"
        Me.Label8.Size = New System.Drawing.Size(109, 18)
        Me.Label8.TabIndex = 64
        Me.Label8.Text = "Cập nhật thành"
        Me.Label8.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'frmMaHoaTaiLieu
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.Color.LightBlue
        Me.ClientSize = New System.Drawing.Size(792, 573)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.txtCapNhatThanh)
        Me.Controls.Add(Me.CboSoLanBanHanh)
        Me.Controls.Add(Me.TxtSoLanBanHanh)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.TxtSoThuTu)
        Me.Controls.Add(Me.TxtKyHieu)
        Me.Controls.Add(Me.CboLoaiTaiLieu)
        Me.Controls.Add(Me.TxtTenLoaiTaiLieu)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.CboBoPhanBanHanh)
        Me.Controls.Add(Me.DataGridView1)
        Me.Controls.Add(Me.TxtTenBoPhanBanHanh)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.BtnIn)
        Me.Controls.Add(Me.BtnClose)
        Me.Controls.Add(Me.txtMaTaiLieu)
        Me.Controls.Add(Me.btnDelete1)
        Me.Controls.Add(Me.btnNew)
        Me.Controls.Add(Me.btnSave)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label1)
        Me.Name = "frmMaHoaTaiLieu"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Ma Hoa Danh Muc Tai Lieu"
        CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.TblmahoatailieuBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSetForm_Sop, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region
    Private data1, data2, data3 As DataTable
    Private da As MySqlDataAdapter
    Dim sqlQuery As String = ""
    Dim data As DataTable
    Dim myDT As New DataTable
    Dim strError As String = ""
    '*************************
    Dim stateTaoMoi As Boolean = False
    Dim stateCapNhatThanh As Boolean = False
    '*****************************
    Dim myform As Form

    Private Sub loadMa(ByVal ma As String)
        Dim BoPhanBanHanh As String = ma.Substring(1, 1)
        Dim LoaiTaiLieu As String = ma.Substring(2, 1)
        Dim SoThuTu As String = ma.Substring(3, 3)
        Dim SoLanBanHanh As String = ma.Substring(6)
        For i As Integer = 0 To Me.data1.Rows.Count - 1
            If BoPhanBanHanh = Me.data1.Rows.Item(i).Item(0) Then
                Me.CboBoPhanBanHanh.SelectedIndex = i
                Exit For
            End If
        Next

        For j As Integer = 0 To Me.data2.Rows.Count - 1
            If LoaiTaiLieu = Me.data2.Rows.Item(j).Item(0) Then
                Me.CboLoaiTaiLieu.SelectedIndex = j
                Exit For
            End If
        Next
        Me.TxtSoThuTu.Text = SoThuTu
        For k As Integer = 0 To Me.data3.Rows.Count - 1
            If SoLanBanHanh = Me.data3.Rows.Item(k).Item(0) Then
                Me.CboSoLanBanHanh.SelectedIndex = k
                Exit For
            End If
        Next

    End Sub
    Sub SetclearData()
        txtMaTaiLieu.Text = ""
        CboBoPhanBanHanh.Text = ""
        CboLoaiTaiLieu.Text = ""
        CboSoLanBanHanh.Text = ""
        TxtTenBoPhanBanHanh.Text = ""
        TxtTenLoaiTaiLieu.Text = ""
        TxtTenLoaiTaiLieu.Text = ""
        TxtSoThuTu.Text = ""
        TxtSoLanBanHanh.Text = ""

    End Sub
    Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
        ' Kiểm tra có nhập liệu chưa ?
        ' If Me.checkInput(txtMa_QUAN.Text, txtTen_QUAN.Text) Then
        Dim txtMaQuan = Me.txtMaTaiLieu.Text.Trim
        sqlQuery = "SELECT matailieu FROM tbl_mahoatailieu WHERE matailieu= '" & txtMaQuan & "'"
        Dim existedMamon As Integer = moduleDatabaseConn.CheckRecordExisted(sqlQuery)
        If checkInput() = True And existedMamon = 0 Then ' Insert record
            sqlQuery = "INSERT INTO tbl_mahoatailieu "
            sqlQuery += "(matailieu, mabophanbanhanh,loaitailieu,sothutu,solanbanhanh) "
            sqlQuery += "VALUES "
            sqlQuery += "("
            sqlQuery += "'" & txtMaTaiLieu.Text & "', "
            sqlQuery += "'" & Me.CboBoPhanBanHanh.SelectedItem.Col2 & "', "
            sqlQuery += "'" & Me.CboLoaiTaiLieu.SelectedItem.Col2 & "',"
            sqlQuery += "'" & Me.TxtSoThuTu.Text.Trim & "',"
            sqlQuery += "'" & Me.CboSoLanBanHanh.SelectedItem.Col2 & "'"
            sqlQuery += ")"
            Dim inserted As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
            If inserted = 1 Then
                MessageBox.Show("Thêm thông tin thành công !")
                sqlQuery = "SELECT * FROM tbl_mahoatailieu"
                Me.loadDanhSachDanhmucTaiLieu(sqlQuery)
            Else
                MessageBox.Show("Thêm thông tin không thành công: " & globalVariale.sqlMsgError)
            End If
            Me.stateTaoMoi = False
        Else
            If existedMamon = 1 Then
                moduleConstants.MessageWarning = "Mã  " & txtMaTaiLieu.Text & " đã có , bạn muốn cập nhật không ?"
                If MessageBox.Show(moduleConstants.MessageWarning, globalVariale.msgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = MsgBoxResult.Yes Then
                    ' Update record
                    If checkInput() = True Then
                        'cap nhat thanh 
                        Dim sqlQuery = ""
                        sqlQuery = "INSERT INTO tbl_mahoatailieu "
                        sqlQuery += "(matailieu, mabophanbanhanh,loaitailieu,sothutu,solanbanhanh) "
                        sqlQuery += "VALUES "
                        sqlQuery += "("
                        sqlQuery += "'" & txtCapNhatThanh.Text & "', "
                        sqlQuery += "'" & Me.CboBoPhanBanHanh.SelectedItem.Col2 & "', "
                        sqlQuery += "'" & Me.CboLoaiTaiLieu.SelectedItem.Col2 & "',"
                        sqlQuery += "'" & Me.TxtSoThuTu.Text.Trim & "',"
                        sqlQuery += "'" & Me.CboSoLanBanHanh.SelectedItem.Col2 & "'"
                        sqlQuery += ")"
                        Dim inserted As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                        'delete mã cũ
                        sqlQuery = "DELETE FROM tbl_mahoatailieu WHERE matailieu = '" & txtMaTaiLieu.Text & "'"
                        Dim deleting As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                        If deleting = 1 Then
                            'MessageBox.Show("Xóa thông tin thành công !")
                            If inserted = 1 Then
                                MessageBox.Show("Cập nhật thành công !")
                                sqlQuery = "SELECT * FROM tbl_mahoatailieu"
                                Me.loadDanhSachDanhmucTaiLieu(sqlQuery)
                            Else
                                MessageBox.Show("Thêm thông tin không thành công: " & globalVariale.sqlMsgError)
                            End If
                        End If
                        Me.stateCapNhatThanh = False
                    End If
                End If
            End If
        End If
    End Sub

    Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click
        SetclearData()
        txtMaTaiLieu.Focus()
        txtMaTaiLieu.ReadOnly = False
        Me.stateTaoMoi = True
        Me.stateCapNhatThanh = False
        Me.txtCapNhatThanh.Text = ""
        Me.txtMaTaiLieu.Text = ""
    End Sub


    Private Sub btnDelete1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete1.Click
        Dim txtMaQuan As String = Trim(Me.txtMaTaiLieu.Text)
        If txtMaQuan = "" Then
            MessageBox.Show("Bạn chưa chọn Mã để xóa !")
        Else
            Dim txtTenQuan As String = Trim(Me.TxtTenLoaiTaiLieu.Text)
            moduleConstants.MessageWarning = "Bạn có muốn xóa " & txtMaQuan & "(" & txtTenQuan & ") ?"
            If MessageBox.Show(moduleConstants.MessageWarning, globalVariale.msgTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = MsgBoxResult.Yes Then
                Dim sqlQuery As String = "DELETE FROM tbl_mahoatailieu WHERE matailieu = '" & txtMaQuan & "'"
                Dim deleting As Integer = moduleDatabaseConn.ExecuteNonQuery(sqlQuery)
                If deleting = 1 Then
                    MessageBox.Show("Xóa thông tin thành công !")
                    sqlQuery = "SELECT * FROM tbl_mahoatailieu"
                    Me.loadDanhSachDanhmucTaiLieu(sqlQuery)
                Else
                    MessageBox.Show("Xóa thông tin không thành công: " & globalVariale.sqlMsgError)
                End If
            End If
        End If

        Me.stateTaoMoi = False
        Me.stateCapNhatThanh = False
    End Sub

    Private Sub FrmMaHoaTaiLieu_load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
        moduleUtils.setDinhDangVietNam()
        Me.loadDanhSachDanhmucTaiLieu("SELECT * FROM tbl_mahoatailieu")
        Me.txtCapNhatThanh.Text = ""
        Me.txtMaTaiLieu.ReadOnly = True
        Me.loadDanhSachBoPhanBanHanh()
        Me.loadDanhSachLoaiTaiLieu()
        Me.loadDanhSachSoLanBanHanh()
        SetclearData()
        Me.stateCapNhatThanh = False
        Me.stateTaoMoi = True
    End Sub

    Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnClose.Click
        Me.Close()
    End Sub

    Function checkInput() As Boolean
        Dim result As Boolean = True
        If Me.txtMaTaiLieu.Text = Me.txtCapNhatThanh.Text Then
            MessageBox.Show("Bạn không thể cập nhật mã trùng nhau !!!")
            result = False
        End If
        If Me.TxtSoThuTu.TextLength <> 3 Then
            MessageBox.Show("Bạn phải nhập số thứ tự gồm có chiều dài là 3 !!!")
            Me.TxtSoThuTu.Focus()
            result = False
        End If
        Return result
    End Function

    Private Sub loadDanhSachDanhmucTaiLieu(ByVal sqlQuery As String)
        Me.DataGridView1.DataSource = moduleDatabaseConn.GetDataTable(sqlQuery)
    End Sub
    Private Sub loadDanhSachBoPhanBanHanh()
        Dim sqlQuery As String = ""
        sqlQuery = "SELECT ma, ten FROM tbl_bophanbanhanh ORDER BY ma"
        data1 = moduleDatabaseConn.GetDataTable(sqlQuery)
        CboBoPhanBanHanh.Items.Clear()
        CboBoPhanBanHanh.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
        CboBoPhanBanHanh.ColumnNum = 2
        CboBoPhanBanHanh.ColumnWidth = "100;250"
        CboBoPhanBanHanh.HighlightBorderColor = Color.Black
        CboBoPhanBanHanh.GridLineHorizontal = True
        CboBoPhanBanHanh.GridLineVertical = True
        CboBoPhanBanHanh.ItemHeight = 17
        CboBoPhanBanHanh.DropDownHeight = 300
        CboBoPhanBanHanh.SourceDataTable = data1
        CboBoPhanBanHanh.SelectedIndex = 0
    End Sub
    Private Sub CboBoPhanBanHanh_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboBoPhanBanHanh.SelectedIndexChanged
        Me.TxtTenBoPhanBanHanh.Text = Me.CboBoPhanBanHanh.SelectedItem.Col2
        If Me.stateCapNhatThanh = True Then
            loadKeyCapNhat()
        Else
            loadKey()
        End If
    End Sub
    Private Sub loadDanhSachSoLanBanHanh()
        Dim sqlQuery As String = ""
        sqlQuery = "SELECT ma, ten FROM tbl_solanbanhanh ORDER BY ma"
        data3 = moduleDatabaseConn.GetDataTable(sqlQuery)
        CboSoLanBanHanh.Items.Clear()
        CboSoLanBanHanh.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
        CboSoLanBanHanh.ColumnNum = 2
        CboSoLanBanHanh.ColumnWidth = "100;250"
        CboSoLanBanHanh.HighlightBorderColor = Color.Black
        CboSoLanBanHanh.GridLineHorizontal = True
        CboSoLanBanHanh.GridLineVertical = True
        CboSoLanBanHanh.ItemHeight = 17
        CboSoLanBanHanh.DropDownHeight = 300
        CboSoLanBanHanh.SourceDataTable = data3
        CboSoLanBanHanh.SelectedIndex = 0
    End Sub
    Private Sub CboSoLanBanHanh_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboSoLanBanHanh.SelectedIndexChanged
        Me.TxtSoLanBanHanh.Text = Me.CboSoLanBanHanh.SelectedItem.Col2
        If Me.stateCapNhatThanh = True Then
            loadKeyCapNhat()
        Else
            loadKey()
        End If
    End Sub
    Private Sub loadDanhSachLoaiTaiLieu()
        Dim sqlQuery As String = ""
        sqlQuery = "SELECT ma,ten FROM tbl_loaitailieu ORDER BY ma"
        data2 = moduleDatabaseConn.GetDataTable(sqlQuery)
        CboLoaiTaiLieu.Items.Clear()
        CboLoaiTaiLieu.LoadingType = MTGCComboBox.CaricamentoCombo.DataTable
        CboLoaiTaiLieu.ColumnNum = 2
        CboLoaiTaiLieu.ColumnWidth = "100;250"
        CboLoaiTaiLieu.HighlightBorderColor = Color.Black
        CboLoaiTaiLieu.GridLineHorizontal = True
        CboLoaiTaiLieu.GridLineVertical = True
        CboLoaiTaiLieu.ItemHeight = 17
        CboLoaiTaiLieu.DropDownHeight = 300
        CboLoaiTaiLieu.SourceDataTable = data2
        CboLoaiTaiLieu.SelectedIndex = 0
    End Sub
    Private Sub CboLoaitaiLieu_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CboLoaiTaiLieu.SelectedIndexChanged
        Me.TxtTenLoaiTaiLieu.Text = Me.CboLoaiTaiLieu.SelectedItem.Col2
        If Me.stateCapNhatThanh = True Then
            loadKeyCapNhat()
        Else
            loadKey()
        End If
    End Sub

    Private Sub DataGridView1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellClick
        Me.stateCapNhatThanh = True
        Dim iRow As Integer = Me.DataGridView1.CurrentRow.Index
        Me.txtMaTaiLieu.Text = Me.DataGridView1.Item(0, iRow).Value
        loadMa(Me.DataGridView1.Item(0, iRow).Value)

    End Sub

    Private Sub BtnIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnIn.Click
        FrmCrMaSoTaiLieu.Show()
    End Sub


    Private Sub TxtSoThuTu_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TxtSoThuTu.TextChanged
        If Me.stateCapNhatThanh = True Then
            loadKeyCapNhat()
        Else
            loadKey()
        End If
    End Sub

    Private Sub loadKey()
        Dim Key As String = ""
        Key = TxtKyHieu.Text.ToUpper + CboBoPhanBanHanh.Text.ToUpper + CboLoaiTaiLieu.Text.ToUpper + TxtSoThuTu.Text.ToUpper + CboSoLanBanHanh.Text.ToUpper

        If Me.stateTaoMoi = True Then
            Me.txtMaTaiLieu.Text = Key
        Else
            Me.txtMaTaiLieu.Text = ""
        End If

        Me.txtCapNhatThanh.ReadOnly = True
        Me.txtMaTaiLieu.ReadOnly = True
    End Sub

    Private Sub loadKeyCapNhat()
        Dim Key As String = ""
        Key = TxtKyHieu.Text.ToUpper + CboBoPhanBanHanh.Text.ToUpper + CboLoaiTaiLieu.Text.ToUpper + TxtSoThuTu.Text.ToUpper + CboSoLanBanHanh.Text.ToUpper

        If Me.stateCapNhatThanh = True Then
            Me.txtCapNhatThanh.Text = Key
        Else
            Me.txtCapNhatThanh.Text = ""
        End If

        Me.txtCapNhatThanh.ReadOnly = True
        Me.txtMaTaiLieu.ReadOnly = True
    End Sub

    Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
        Me.stateCapNhatThanh = True
    End Sub
End Class


